#include "Frame.h"


Frame::Frame(void)
{
	
}


Frame::~Frame(void)
{

}

void Frame::Init(int x, int y, int width, int height, float time, tVector2D point, RECT cRect, RECT aRect, std::string mess)
{
	xFramePos = x;
	yFramePos = y;
	frameWidth = width;
	frameHeight = height;
	anchorPoint = point;
	timePerFrame = time;
	activeRect = aRect;
	eventMessage = mess;

	colRect.bottom = (cRect.bottom - cRect.top); 
	colRect.top = (cRect.top - y);
	colRect.right = (cRect.right - cRect.left);
	colRect.left = (cRect.left - x);

	if(activeRect.bottom > 0)
	{
		activeRect.bottom = (aRect.bottom - aRect.top); 
		activeRect.top = (aRect.top - y);
		activeRect.right = (aRect.right - aRect.left);
		activeRect.left = (aRect.left - x);
	}
}
